package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

/**
 * 角色表 实体Bean
 */
@TableName("t_role")
public class RoleBean {
    /** 角色ID */
    @TableId(value = "pk_roleId",type = IdType.AUTO)
    private Integer roleId;
    /** 角色名称 */
    @TableField("r_name")
    private String name;
    /** 角色拥有的权限集合 */
    @TableField(exist = false)
    private List<GradeBean> gradeBeanList;

    public RoleBean() {
    }

    public RoleBean(String name) {
        this.name = name;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<GradeBean> getGradeBeanList() {
        return gradeBeanList;
    }

    public void setGradeBeanList(List<GradeBean> gradeBeanList) {
        this.gradeBeanList = gradeBeanList;
    }

    @Override
    public String toString() {
        return "RoleBean{" +
                "roleId=" + roleId +
                ", name='" + name + '\'' +
                ", gradeBeanList=" + gradeBeanList +
                '}'+'\n';
    }
}
